home *** CD-ROM | disk | FTP | other *** search
Wrap
on beginSprite me global scount, stock, tableau puppetSound(3, "deal1") sprite(me.spriteNum).visible = 1 if scount = 1 then tableau.addProp(symbol(string(sprite(me.spriteNum).startFrame)), new(script("tableauobj"), [])) else sprite(me.spriteNum).loc = sprite(me.spriteNum - 1).loc + point(sprite(me.spriteNum).width / 2, 0) end if scount = scount + 1 if scount = 4 then scount = 1 end if sprite(me.spriteNum).member = stock[1].rank & "_" & stock[1].suit tableau[symbol(string(sprite(me.spriteNum).startFrame))].cards.add(new(script("card"), me.spriteNum)) stock.deleteAt(1) end on mouseDown me global tableau puppetSound(3, "pickcard") if sprite(me.spriteNum).visible = 1 then if me.spriteNum = tableau[symbol(string(sprite(me.spriteNum).startFrame))].cards[tableau[symbol(string(sprite(me.spriteNum).startFrame))].cards.count].spnum then sprite(me.spriteNum).locZ = me.spriteNum + 1000 sprite(me.spriteNum).moveableSprite = 1 sprite(me.spriteNum).loc = the mouseLoc end if end if end on mouseUp me global equalvalue, hotcard, tableau, foundation, points if me.spriteNum = tableau[symbol(string(sprite(me.spriteNum).startFrame))].cards[tableau[symbol(string(sprite(me.spriteNum).startFrame))].cards.count].spnum then if the clickOn = me.spriteNum then if sprite(me.spriteNum).visible = 1 then if (equalvalue = 1) and (hotcard <> 0) then puppetSound(3, "pickcard") sprite(me.spriteNum).loc = tableau[symbol(string(sprite(me.spriteNum).startFrame))].cards[tableau[symbol(string(sprite(me.spriteNum).startFrame))].cards.count].location sprite(me.spriteNum).moveableSprite = 0 sprite(me.spriteNum).visible = 0 sprite(hotcard).member = sprite(the clickOn).member tableau[symbol(string(sprite(me.spriteNum).startFrame))].cards.deleteAt(tableau[symbol(string(sprite(me.spriteNum).startFrame))].cards.count) foundation[symbol(string(hotcard))].cards.append(new(script("card"), hotcard)) points = points + 10 else puppetSound(3, "dropcard") sprite(me.spriteNum).locZ = me.spriteNum sprite(me.spriteNum).moveableSprite = 0 sprite(me.spriteNum).loc = tableau[symbol(string(sprite(me.spriteNum).startFrame))].cards[tableau[symbol(string(sprite(me.spriteNum).startFrame))].cards.count].location end if end if end if end if sprite(me.spriteNum).locZ = me.spriteNum end